﻿@model Modelo.Dominio.Cliente

@section featured {
<section class="featured">
    <div class="content-wrapper">
        <hgroup class="title">
            <h1>@ViewBag.Title.</h1>
            <h2>@ViewBag.Message</h2>
        </hgroup>
    </div>
</section>
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Cliente</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.Nome)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nome)
            @Html.ValidationMessageFor(model => model.Nome)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CPF)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CPF)
            @Html.ValidationMessageFor(model => model.CPF)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RG)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RG)
            @Html.ValidationMessageFor(model => model.RG)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Telefone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Telefone)
            @Html.ValidationMessageFor(model => model.Telefone)
        </div>

        <p>
            <input type="submit" value="Alterar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Visualizar todos os clientes", "Index")
</div>
